package org.example.controller;

import org.example.pojo.ClientBusinessDo;
import org.example.service.ClientBusinessServcie;
import org.example.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客户信息封装
 */
@RestController
public class ClientBusinessController {
    @Autowired
    private ClientBusinessServcie clientBusinessServcie;
    /**
     * 获取到单个客户并同步缓存到redis中去
     */
    @GetMapping("/getClientByAppkey")
    public R getClientByAppkey(@RequestParam ("appKey") String appKey){
      ClientBusinessDo clientBusinessDo= clientBusinessServcie.getAppkey(appKey);


        return R.ok(clientBusinessDo);
    }


}
